home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / DESK / CORE / Desk / h / Font < prev    next >
Text File  |  1996-05-21  |  4KB  |  124 lines

  1.  
  2. #ifndef __Desk_Font_h
  3. #define __Desk_Font_h
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifndef __Desk_Core_h
  8. #include "Desk.Core.h"
  9. #endif
  10. #ifndef __Desk_Wimp_h
  11. #include "Desk.Wimp.h"
  12. #endif
  13. typedef int Desk_font_handle;
  14. typedef struct
  15. {
  16. char name[128]; 
  17. int xsize, ysize, xres, yres;
  18. int age, usage;
  19. } Desk_font_defn;
  20. typedef struct
  21. {
  22. int minx, miny, maxx, maxy;
  23. } Desk_font_info;
  24. typedef struct
  25. {
  26. char *s; 
  27. int x; 
  28. int y; 
  29. int split; 
  30. int term; 
  31. } Desk_font_string;
  32. typedef struct
  33. {
  34. int background, foreground;
  35. } Desk_font_colours;
  36. typedef struct
  37. {
  38. Desk_font_handle font;
  39. Desk_font_colours colour;
  40. int offset;
  41. } Desk_font_state;
  42. typedef struct
  43. {
  44. char offset;
  45. char thresholds[15];
  46. } Desk_font_thresholds;
  47. extern void Desk_Font_CacheAddr(int *version, int *cacheused, int *cachesize); 
  48. extern void Desk_Font_ListFonts(char *name, int *count); 
  49. extern void Desk_Font_ReadDefn(Desk_font_handle font, Desk_font_defn *defn); 
  50. extern void Desk_Font_ReadInfo(Desk_font_handle font, Desk_font_info *info); 
  51. extern void Desk_Font_ConverttoOS(int x, int y, int *xout, int *yout); 
  52. #define Desk_Font_ConvertToOS Desk_Font_ConverttoOS 
  53. extern void Desk_Font_Converttopoints(int x, int y, int *xout, int *yout); 
  54. #define Desk_Font_ConvertToPoints Desk_Font_Converttopoints 
  55. extern void Desk_Font_FindFont(Desk_font_handle *font, const char *name,
  56. int xsize, int ysize, int xres, int yres); 
  57. extern void Desk_Font_LoseFont(Desk_font_handle font); 
  58. extern void Desk_Font_LoseAllFonts(Desk_font_array *fonts);
  59. extern void Desk_Font_SetFont(Desk_font_handle font); 
  60. extern void Desk_Font_CurrentFont(Desk_font_state *state); 
  61. extern void Desk_Font_FutureFont(Desk_font_state *state); 
  62. extern void Desk_Font_Paint(char *, int options, int x, int y); 
  63. extern void Desk_Font_Caret(int colour, int height, int flags, int x, int y); 
  64. extern void Desk_Font_FindCaret(Desk_font_string *string); 
  65. extern void Desk_Font_FindCaretJ(Desk_font_string *s, int xoffset, int yoffset); 
  66. extern void Desk_Font_StringWidth(Desk_font_string *string); 
  67. extern void Desk_Font_CharBBox(Desk_font_handle font, char c,
  68. int flags, Desk_font_info *info); 
  69. extern void Desk_Font_StringBBox(char *string, Desk_font_info *info); 
  70. extern void Desk_Font_ReadScaleFactor(int *xscale, int *yscale); 
  71. extern void Desk_Font_SetFontColours(Desk_font_handle font,
  72. int Desk_back_colour, int Desk_fore_colour,
  73. int offset);
  74. extern void Desk_Font_SetPalette(int Desk_back_log, int Desk_fore_log,
  75. int offset,
  76. int Desk_back_phys, int Desk_fore_phys);
  77. extern void Desk_Font_ReadThresholds(Desk_font_thresholds *t);
  78. extern void Desk_Font_SetThresholds(Desk_font_thresholds *t);
  79. #define Desk_font_justify_NONE (0)
  80. #define Desk_font_justify_CURSOR (1<<0)
  81. #define Desk_font_justify_COORBLOCK (1<<5)
  82. #define Desk_font_rubout_NONE (0)
  83. #define Desk_font_rubout_CURSOR (1<<1)
  84. #define Desk_font_rubout_COORBLOCK (1<<1 + 1<<5)
  85. #define Desk_font_plot_OSCOORS (1<<4)
  86. #define Desk_font_plot_TRANSMATRIX (1<<6)
  87. #define Desk_font_STRLEN (1<<7)
  88. #define Desk_font_plot_CURRENTHANDLE (1<<8)
  89. #define Desk_font_plot_KERN (1<<9)
  90. typedef struct {
  91. struct {
  92. Desk_wimp_point space;
  93. Desk_wimp_point letter;
  94. }
  95. offsets;
  96. Desk_wimp_rect rubout;
  97. }
  98. Desk_font_coorblock;
  99. typedef struct {
  100. struct {
  101. int xx; 
  102. int xy;
  103. int yx;
  104. int yy;
  105. }
  106. scale;
  107. Desk_wimp_point translate;
  108. }
  109. Desk_font_transformation;
  110. void Desk_Font_Paint3(
  111. Desk_font_handle font, 
  112. const char *string, 
  113. unsigned int plottype,
  114. int x,
  115. int y,
  116. Desk_font_coorblock *coorblock,
  117. Desk_font_transformation *transformation,
  118. int length
  119. );
  120. #ifdef __cplusplus
  121. }
  122. #endif
  123. #endif
  124.